// 构造选项卡函数
function tabSwitch(fatherObj){
	var _this = this
	// 绑定实例属性
	this.li_list = fatherObj.getElementsByTagName('li');
	this.div_list = fatherObj.getElementById('content').children;
	for(var i = 0; i < this.li_list.length;i++){
		this.li_list[i].index = i
		this.li_list[i].onclick = function(){
			_this.clickFun(this.index);
		}
	}
}
// 绑定共享方法
tabSwitch.prototype.clickFun = function(index){
	for(var j = 0;j < this.li_list.length;j++){
		this.li_list[j].className = ''
	}
	this.li_list[index].className = 'now';
	for(var k = 0; k < this.div_list.length;k++){
		this.div_list[k].className = ''
	}
	this.div_list[index].className = 'current';	
}